﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Uber.Messages;
using Uber.HabboHotel.GameClients;

namespace Uber.HabboHotel.Catalogs
{
    class ClubGift
    {
        public string Name;
        public int ItemId;
        public int SpriteId;
        public int DaysNeed;
        public bool IsVip;

        public ClubGift(string mName, int mItemId, int mSpriteId, int mDaysNeed, bool mIsVip)
        {
            this.Name = mName;
            this.ItemId = mItemId;
            this.SpriteId = mSpriteId;
            this.DaysNeed = mDaysNeed;
            this.IsVip = mIsVip;
        }

        public void Serialize(ServerMessage Message)
        {
            Message.AppendInt32(ItemId);
            Message.AppendStringWithBreak(Name);
            Message.AppendBoolean(true);
            Message.AppendBoolean(false);
            Message.AppendBoolean(false);
            Message.AppendBoolean(true);
            Message.AppendStringWithBreak("s");
            Message.AppendInt32(SpriteId);
            Message.AppendBreak();
            Message.AppendBoolean(true);
            Message.AppendInt32(-1);
        }

        public void SerializeIndex(ServerMessage Message, GameClient Session)
        {
            Message.AppendInt32(ItemId);
            Message.AppendBoolean(IsVip);
            Message.AppendInt32(DaysNeed);
            Message.AppendBoolean((Session.GetHabbo().GetSubscriptionManager().GetCurrentSub.DaysDone >= this.DaysNeed) ? true : false);// canselect
        }
    }
}
